#ifndef COMMUNICATE_H
#define COMMUNICATE_H

#include <QObject>
#include <QTcpSocket>
#include <QJsonObject>
#include <QJsonDocument>
#include <QJsonArray>
class communicate : public QObject
{
    Q_OBJECT
public:
    explicit communicate(QObject *parent = nullptr);
    void writeClientData(const QJsonObject&json);
signals:
    void rstResult(int ret);
    void m_rstLogin(QJsonObject json);
    void receiveSingleQ(QJsonArray json);
    void Rank(QJsonObject json);
public slots:
    void readClientData();

private:
    QTcpSocket s;

};

#endif // COMMUNICATE_H
